package game;

import org.lwjgl.util.vector.Vector3f;

public class AABB {
	
	public float x0, y0, z0, w, h, d;
	
	public AABB(float x0, float y0, float z0, float w, float h, float d) {
		this.x0 = x0;
		this.y0 = y0;
		this.z0 = z0;
		this.w =  w;
		this.h = h;
		this.d = d;
	}
	
	public boolean intersects(AABB c) {
		if (x0 > c.x0 + c.w && x0 + w < c.x0) return false;
		if (y0 > c.y0 + c.h && y0 + h < c.y0) return false;
		if (z0 > c.z0 + c.d && z0 + d < c.z0) return false;
		return true;
	}
	
	public boolean canMove(AABB c, float x, float y, float z) {
		float x0 = 1234567890;
		
		System.out.println("teas");
		return false;
	}
	
	public void move(float x, float y, float z) {
		x0 += x;
		y0 += y;
		z0 += z;
	}

	public void setPos(Vector3f pos) {
		x0 = pos.x;
		y0 = pos.y;
		z0 = pos.z;
	}
}
